<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class SwtTransferOrderBuyer extends Model
{
    use HasFactory,HasDateTimeFormatter;

    protected $table = 'swt_transfer_order_buyer';

    protected $guarded = [];

    public function order()
    {
        return $this->belongsTo(SwtTransferOrder::class, 'order_id');
    }

    public function buyer()
    {
        return $this->belongsTo(SwtIdentity::class, 'buyer_id','user_id');
    }
}
